package com.atcper

import scala.Console.println

/**
 * @author : ranzlupup
 * @date : 2023/2/22 08:39
 */
object Scala09_Control {

    def main(args: Array[String]): Unit = {
        // 值调用
        def f = () => {
            println("f......")
            10
        }

        foo(f())

        println("=======================")
        // 名调用
        foo1(f())

    }

    def foo(a: Int) = {
        println(a)
        println(a)
    }

    def foo1(a: => Int)={
        println(a)
        println(a)
    }
}
